#include <stdlib.h>
#include <string.h>
#include "summon.h"

struct summon * new_summon(
				int id, 
				char *name,
				int type,
				int owner,
				int hp,
				int mp,
				int exp,
				char *skill,
				int pos,
				int frame,
				int point,
				int strong,
				int talent,
				int agile,
				int wisdom,
				int rn_savvy,
				int wl_savvy,
				int js_savvy,
				int tp_savvy,
				int mj_savvy	
				)
{
	struct summon *summon = (struct summon*)malloc(sizeof(struct summon));
	
	if (summon == NULL)
	{
		return NULL;
	}

	summon->id = id;
	summon->name = new_string(name);
	summon->type = type;
	summon->owner = owner;
	summon->hp = hp;
	summon->mp = mp;
	summon->exp = exp;
	summon->skill = new_string(skill);
	summon->pos = pos;
	summon->frame = frame;
	summon->point = point;
	summon->strong = strong;
	summon->talent = talent;
	summon->agile = agile;
	summon->wisdom = wisdom;
	summon->rn_savvy = rn_savvy;
	summon->wl_savvy = wl_savvy;
	summon->js_savvy = js_savvy;
	summon->tp_savvy = tp_savvy;
	summon->mj_savvy = mj_savvy;
	
	return summon;
}


